x86/APIC: don't make wrong implications on constants
authorJan Beulich <jbeulich@suse.com>
Thu, 2 Oct 2014 15:03:04 +0000 (17:03 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 2 Oct 2014 15:03:04 +0000 (17:03 +0200)
commit9cf434b0fa68ca7299f0cc9a2e25ca1085ee31c3
tree4d55fc8bdd799e8384b590a3b1ea5a702dd9fa8d
parent4c7d19b4dad2632b686c1be796abac16d8816046
x86/APIC: don't make wrong implications on constants

For the physical APIC, oprofile code was abusing APIC_DM_NMI as a mask.

For the virtual APIC, a wrong assumption was made that LVTPC could be
programmed to only fixed or NMI delivery modes. While other modes are
invalid here, we still shouldn't inject an NMI into the guest in such
a case. Instead just do nothing.

In the course of adjusting this it became obvious that what value
vpmu_do_interrupt() returns on its various return paths was pretty
arbitrary. With its only caller ignoring the return value, simply make
the function's return type "void".

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/vpmu.c
xen/arch/x86/oprofile/nmi_int.c
xen/include/asm-x86/hvm/vpmu.h